home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
util
/
rexx
/
PGPwithYAM.lha
/
SignEncryptMail.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-07-13
|
1KB
|
49 lines
/* Sign and encrypt a mail with Phil's PGP for YAM
* $VER: SignEncryptMail.rexx 1.4 (13-Jul-97) by Michael Praschl
*/
OPTIONS RESULTS
userid = 'Michael Praschl' /* To encrypt mails with your personal key, too, */
/* so you can read sent messages */
pgppath = 'PGP:bin/pgp'
pgpcommand = '-seat'
CALL CLOSE 'STDOUT'
CALL CLOSE 'STDIN'
CALL OPEN 'STDIN','CON:0/14/1000/200/YAM-REXX/CLOSE'
CALL PRAGMA '*','STDIN'
CALL OPEN 'STDOUT','*'
IF ~SHOW('Ports','YAM') THEN DO
ADDRESS 'COMMAND'
'Run YAM:YAM NOCHECK HIDE'
'SYS:RexxC/WaitForPort YAM'
END
IF SHOW('Ports','YAM') THEN DO
ADDRESS 'YAM'
GETMAILINFO FILE
mailfile = RESULT
ADDRESS 'COMMAND'
'YAM:Rexx/splitmail' mailfile
if exists('ram:body') then DO
pgppath '>RAM:keys -kv'
if exists('ram:keys') then 'YAM:Rexx/SelectPGPKey RAM:keys OUTFILE RAM:selected'
if exists('ram:selected') then
if exists('ram:body') then DO
pgppath pgpcommand 'ram:body' userid '-@ram:selected'
if exists('ram:body.asc') then
if exists('ram:head') then
'join ram:head ram:body.asc to' mailfile
END
END
'delete >NIL: ram:head ram:body ram:body.asc ram:keys ram:selected'
END